package edu.guet.server.service;

import edu.guet.server.model.UnitHomework;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.Optional;

@Service
public interface UnitHomeworkService {

    /**
     * 添加作业
     * @param unitId
     * @param maxScore
     * @param title
     * @param content
     * @param startTime
     * @param endTime
     * @param eachotherStart
     * @param attachmentUrl
     * @return
     */
    UnitHomework createUnitHomework(Integer unitId,Integer maxScore,String title, String content,Date startTime, Date endTime,Date eachotherStart,String attachmentUrl);


    /**
     * 删除作业
     * @param homeworkId
     */
    void deleteWork(String homeworkId);


    /**
     * 获取一个作业信息
     *
     * @param homeworkId 作业ID
     * @return 作业信息
     */
    Optional<UnitHomework> getOneWorkById(String homeworkId);

}
